home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-06-28 | 19.5 KB | 445 lines | [TEXT/pdos] |
- Apple II
- Technical Notes
- _____________________________________________________________________________
- Developer Technical Support
-
-
- Apple IIe
- #10: The Apple IIe Card for the Macintosh LC
-
- Written by: Jim Luther, Rob Moore, John Arkley, Mike Askins
- & Paul Wenker July 1991
-
- This Technical Note discusses all the miscellaneous differences we know of
- between an enhanced Apple IIe and the Apple IIe Card for the Macintosh LC
- running version 1.0 of the IIe Startup application. This Note also contains
- routines needed to check and change the speed of the Apple IIe Card.
- _____________________________________________________________________________
-
- The Apple IIe Card for the Macintosh LC was designed to act as much like an
- enhanced Apple IIe as possible. For this reason, you should refer to the
- Apple IIe Technical Reference Manual for most technical information.
- However, our implementation of an Apple IIe is not completely perfect, so
- that's why we wrote this Note. The next several sections of this Note
- describe the differences we know of between an enhanced Apple IIe and the
- Apple IIe Card for the Macintosh LC. The AppleJIIe Card can be identified
- using the routine in Apple II Miscellaneous Technical Note #2 or the
- identification bytes listed in Apple II Miscellaneous Technical Note #7.
-
-
- Keyboard
-
- The Apple IIe Card option panel allows the user to set three keyboard
- parameters not available on an Apple IIe: delay until repeat, repeat rate,
- and type ahead. The ability to set these parameters is also available on the
- Apple IIgs. If your application has trouble with the settings of any of
- these parameters, your documentation should make note of it.
-
- The keyboard layout available to the user of an Apple IIe Card may be quite
- different than an AppleJIIe since any Apple Desktop Bus (ADB) keyboard might
- be attached to the Macintosh LC. Because of the variations in ADB keyboard
- layouts, applications should not depend on any specific key placement.
-
- The single-wire Shift-key modification which allows software to read the
- state of the shift-key with the PB2 switch input is not implemented.
-
-
- Game I/O Signals
-
- The game I/O signals are all handled by the Apple IIe Card hardware. The
- only game I/O signals available from the Apple IIe Card are those available
- at the 9 pin D-type miniature connector. The Apple IIe Card does not have a
- 16-pin DIP socket for game I/O signals, so the AN0-AN3 annunciator outputs
- and the STROBE+ output are not available.
-
-
-
- Soft Switch Differences
-
- The following soft switches are not implemented on the Apple IIe Card:
-
- Name Access Address Comment
- ----------------------------------------------------------------
- CASSIN R $C060 There is no cassette I/O
- CASSO W $C020 There is no cassette I/O
- IOUDIS W $C07E There is no IOU to disable
- IOUDIS W $C07F There is no IOU to enable
- RDIOUDIS R7 $C07E There is no IOUDIS switch to read
-
- The RDDHIRES ($C07F) soft switch is not implemented in version 1.0 of the IIe
- Startup application. This soft switch may or may not be implemented in a
- future version of the IIe Startup application.
-
- The VBL ($C019) soft switch cycles at 60 Hz, but it is not synchronized with
- the Macintosh LC video. This may cause flicker in some animation displays
- that depend on VBLs.
-
-
- Monitor Routines
-
- Several Monitor routine act different on the Apple IIe Card then they do on
- an Apple IIe. Here's a list of those routines:
-
- Subroutine Address Comment
- -----------------------------------------------------------------------------
- BELL $FF3A The Apple IIe Card option panel allows the bell tone
- produced by the BELL subroutines to be set to a
- Macintosh sound. BELL on an Apple IIe will generate
- a 1 kHz tone for approximately 0.1 second. Since
- the duration of Macintosh sounds may or may not be
- 0.1 second (most sounds are much longer than 0.1
- second), you should not depend on the BELL
- subroutines for timing.
- BELL1 $FBDD See BELL.
- GETLN $FD6A The GETLN input subroutines treats the Delete key
- the same as the Backspace key (,). This is the same
- way the Delete key is treated by GETLN on an Apple
- IIgs. The AppleSoft BASIC INPUT statement calls
- GETLN, so it is also affected.
- GETLNZ $FD67 See GETLN.
- GETLN1 $FD6F See GETLN.
- PREAD $FB1E The PREAD subroutine timing is not adjusted for the
- fast (1.9JMHz) 65C02 processor speed. The AppleSoft
- BASIC PDL function calls PREAD, so it is also
- affected.
- READ $FEFD The READ cassette subroutine is not implemented and
- consists of a single RTS instruction.
- WAIT $FDA8 The WAIT subroutine timing is not adjusted for the
- fast (1.9JMHz) 65C02 processor speed.
- WRITE $FECD The WRITE cassette subroutine is not implemented and
- consists of a single RTS instruction.
-
-
-
- Memory Access and Timing
-
- When the 65C02 accesses certain key I/O locations or writes to the active
- Apple IIe display memory, it is "Trapped" (or halted temporarily) and the
- address accessed and data read or written is latched so the information is
- available to the IIe Startup application running on the MacintoshJLC. After
- the IIe Startup application has gathered the data, it allows the 65C02 to
- continue. Access to Trapped memory locations will cause problems with timing
- sensitive 65C02 code. The following table lists the Trapped access areas and
- what type of access (Read or Write) will cause the Trap to activate on the
- Apple IIe Card
-
- Address R/W Description
- -----------------------------------------------------
- Display Areas
- $400-7FF Write Text/LoRes page 1 stores
- $800-BFF Write Text/LoRes page 2 stores
- $2000-3FFF Write HiRes/Dbl-HiRes page 1 stores
- $4000-5FFF Write HiRes/Dbl-HiRes page 2 stores
-
- Internal Soft Switch and I/O Areas
- $C000-C001 Write 80STORE soft switches
- $C00C-C00D Write 80COL soft switches
- $C00E-C00F Write ALTCHARSET soft switches
- $C050-C057 R/W Display soft switches
- $C058-C05F R/W Annunciators
- $C070 R/W PDLTRIG
-
- I/O Slot accesses
- $C090-C09F R/W Slot 1 Hardware accesses
- $C0A0-C0AF R/W Slot 2 Hardware accesses
- $C0B0-C0BF R/W Slot 3 Hardware accesses
- $C0C0-C0CF R/W Slot 4 Hardware accesses
- $C0D0-C0DF R/W Slot 5 Hardware accesses
- $C0E8-C0E9 R/W Slot 6 Disk 5.25" Motor on/off switch
- $C0F0-C0FF R/W Slot 7 Hardware accesses
- $CFFF R/W Shared $C8-space switch
-
- Notes:
- 1. The "Screen-Hole" areas in the above address ranges do not trap. These
- are the $xx78-7F and $xxF8-FF address ranges in the display areas.
- 2. Display writes do not trap when the Slot 6 motor switch is on.
- 3. The auxiliary text pages will be trapped whenever 80COL ($C00D) is on,
- unless the current screen mode is a full screen graphics mode.
- 4. The auxiliary HiRes pages will be trapped only when Double HiRes is
- being displayed.
-
-
- Cassette I/O
-
- The Apple IIe Card does not have the cassette tape input and output miniature
- phone jacks and the Monitor cassette routines READ and WRITE do nothing.
-
-
- 65C02 Processor Speed
-
- The 65C02 processor on the Apple IIe Card can be run at two speeds; the
- normal Apple IIe 1 MHz or a fast speed of approximately 1.9 MHz. Normally,
- the 65C02 processor speed setting should be left at whatever the user of the
- system set it to with the Apple IIe Card option panel. However, we know
- there are some times when an application must change the speed of the system
- so we've provided safe routines to change the speed and to obtain the speed
- setting of the Apple IIe Card option panel. Below are four short assembly
- language routines you can use to manipulate the 65C02 processor speed of the
- Apple IIe Option Card for the Macintosh LC.
-
- Warning: You must ensure your application is running on an Apple IIe Card
- before calling these routines. See Apple II Miscellaneous
- Technical Notes #2 and #7 for Apple II Family identification
- information.
-
- ;----------------------------------------------------------------------------
- -
- ;
- ; GetOptPanelSpeed
- ;
- ; Get the option panel's current speed setting. This may or may not be the
- ; current speed of the Apple IIe Option Card -- It is the speed the user has
- ; asked for via the option panel.
- ;
- ; The A, X and Y registers are not changed.
- ; The n, z and c flags are affected.
- ; The c flag (carry) will hold result:
- ; 0 = Normal Speed
- ; 1 = Fast Speed
- ;
- ; WARNING: Location $c05c is a read-only soft switch. You must never
- ; modify the contents of this location.
- ;
- ;----------------------------------------------------------------------------
- -
- ;
- GetOptPanelSpeed pha ; store the A reg
- lda $c05c ; get option panel speed (in bit 2)
- lsr a ; and move it into the carry flag
- lsr a
- lsr a
- pla ; restore the A reg
- rts
-
- ;----------------------------------------------------------------------------
- -
- ;
- ; SetToOptPanelSpeed
- ;
- ; Get the option panel's current speed setting and set the Apple IIe Option
- ; Card to that speed.
- ;
- ; The A, X and Y registers are not changed.
- ; The n, z and c flags are affected.
- ;----------------------------------------------------------------------------
- -
- ;
- SetToOptPanelSpeed jsr GetOptPanelSpeed ; Get the default speed
- bcs SetFastSpeed ; branch to SetFastSpeed
- ; bcc SetNormalSpeed ; fall through to SetNormalSpeed
-
-
- ;----------------------------------------------------------------------------
- -
- ;
- ; SetNormalSpeed
- ;
- ; Set the Apple IIe Option Card to "Normal" speed.
- ;
- ; The A, X and Y registers are not changed.
- ; The z flag may be changed.
- ;
- ; WARNING: All bits at location $c02b are reserved except for bit 3.
- ; In order to manipulate bit 3 at location $c02b and leave the other
- ; reserved bits untouched, you must use a read-modify-write technique.
- ; The test-and-set-bit (TSB) instruction or the test-and-reset-bit (TSR)
- ; instruction can be used to accomplish this. Both of these instructions
- ; allow you to modify any one bit and leave the others untouched.
- ;
- ;----------------------------------------------------------------------------
- -
- ;
- SetNormalSpeed pha
- lda #$04
- trb $c02b ;reset bit 2 to 0
- pla
- rts
-
- ;----------------------------------------------------------------------------
- -
- ;
- ; SetFastSpeed
- ;
- ; Set the Apple IIe Option Card to "Fast" speed.
- ;
- ; The A, X and Y registers are not changed.
- ; The z flag may be changed.
- ;
- ; WARNING: All bits at location $c02b are reserved except for bit 3.
- ; In order to manipulate bit 3 at location $c02b and leave the other
- ; reserved bits untouched, you must use a read-modify-write technique.
- ; The test-and-set-bit (TSB) instruction or the test-and-reset-bit (TSR)
- ; instruction can be used to accomplish this. Both of these instructions
- ; allow you to modify any one bit and leave the others untouched.
- ;
- ;----------------------------------------------------------------------------
- -
- ;
- SetFastSpeed pha
- lda #$04
- tsb $c02b ;set bit 2 to 1
- pla
- rts
-
-
- Peripheral Cards
-
- The Apple IIe Card does not have any real peripheral cards. Instead, it has
- a simulated slot architecture that allows pseudo-I/O devices to be flexibly
- mapped into the various Apple II I/O slot spaces. The subsections or this
- section describe the various pseudo-I/O devices available to the Apple IIe
- Card.
-
- Video
-
- The 80-column video firmware is always in slot 3. The 80-column firmware
- acts just like the 80-column firmware in an Apple IIe or IIc. The Macintosh
- LC monitor is always used for the display device. There is no NTSC
- compatible video signal available from the Apple IIe Card.
-
- The Apple IIe Card option panel allows the user to set the display to
- monochrome or color. When the display is in color mode, the "color fringes"
- seen in Apple IIe graphics may be more distinct on the high resolution color
- video monitors used with the Macintosh LC than they are on composite color
- video monitors or television sets commonly used with the Apple IIe.
-
- The character set used by the Apple IIe Card is the same character set used
- on the enhanced AppleJIIe with two differences: the character set can be
- either normal or inverse by the Apple IIe Card option panel and the flashing
- display format does not flash. When the inverse character set is selected,
- the whole text display is inverted (graphics display modes are not affected).
- When the flashing display format is used, characters are shown as black text
- on a red background (or red text on a black background if the inverse
- character set is selected).
-
- The IIe Startup application updates the Macintosh LC's display every time a
- change is made to the active display pages in the Apple IIe Card's RAM.
- Applications that attempt to animate over 1/3 of the display screen will not
- perform as fast on the Apple IIe Card as the do an Apple IIe. See the Memory
- Access and Timing section of this Note for more information.
-
- Memory Card
-
- The memory card device can be mapped to any slot space except slot 3 (where
- the video firmware always resides) or slot 6 (where the Apple Disk 5.25
- always resides).
-
- The memory card pseudo-I/O device looks like an Apple II Memory Expansion
- Card. It can be accessed through firmware routines or it can be accessed via
- hardware I/O addresses. It can be configured to have 256K, 512K, 768K or
- 1024K RAM with the Apple IIe Card option panel.
-
- Modem and Printer Ports
-
- The modem and printer port devices can be mapped to any slot space except
- slot 3 (where the video firmware always resides) or slot 6 (where the Apple
- Disk 5.25 always resides).
-
- The modem and printer ports pseudo-I/O devices look very much like Apple
- Super Serial Cards. They are compatible with software that uses the standard
- BASIC or Pascal firmware entry points of an Super Serial Card and with most
- software that talks directly to the 6551 Asynchronous Communications
- Interface Adaptor (ACIA) hardware addresses of an Super Serial Card. The
- differences between the modem or printer port devices and a Super Serial Card
- are:
- o Speed - When software talks directly to the 6551 hardware addresses, the
- maximum throughput rate is somewhere between 240 and 480 characters per
- second although any baud rate can be used.
- o Delays - Since the IIe Startup application passes all characters from
- the modem or printer port to the Macintosh LC's serial driver, there may
- be a delay between the time you give the port device a character and
- when the Macintosh serial driver actually sends it.
- o 6551 echo-mode - This 6551 mode (set by accessing the 6551 command
- register) is not supported by the modem and printer port devices.
- o Hardware handshake lines - Since the Macintosh LC only has one input
- (HSKi) and one output (HSKo) handshake lines, not all 6551 hardware
- handshaking is available. HSKi is mapped to the 6551 CTS line which
- cannot be read from software but does control handshaking. HSKo is
- mapped to the 6551 DTR line and can be enabled or disabled with the 6551
- command register.. The DCD and DSR 6551 inputs will always return true.
-
-
- Mouse
-
- The mouse device can be mapped to any slot space except slot 3 (where the
- video firmware always resides) or slot 6 (where the Apple Disk 5.25 always
- resides). The mouse pseudo-I/O device is compatible with software that uses
- the standard AppleMouse II or Apple IIc mouse firmware. The AppleMouse II
- hardware is not emulated by this pseudo-I/O device.
-
- Mouse tracking (mouse speed) can be set by the Apple IIe Card option panel.
-
- Network Printer
-
- The network printer device can be mapped to any slot space except slot 3
- (where the video firmware always resides) or slot 6 (where the Apple Disk
- 5.25 always resides). The network printer pseudo-I/O device allows
- applications to print to a LaserWriter printer or to an ImageWriter printer
- with the LocalTalk option installed as if it were printing to an ImageWriter
- printer connected to a Super Serial Card. The network printer pseudo-I/O
- device's firmware looks very much like Super Serial Card emulation performed
- by the Remote Print Manager on an Apple IIe Workstation card.
-
- SmartPort Devices
-
- The SmartPort devices can be mapped only into slot 5. SmartPort on the Apple
- IIe Card can support one external UniDisk 3.5 drive and either one or two
- internal Macintosh LC SuperDrives.
-
- If an UniDisk 3.5 drive is used, it is connected to the Apple IIe Card's disk
- drive connector and is controlled by the IWM disk controller unit on the
- Apple IIe Card.
-
- The internal Macintosh LC SuperDrives return the same device type and subtype
- as an UniDisk 3.5 drive. However, the internal SuperDrives only support
- standard SmartPort calls and do not support any UniDisk 3.5 specific
- SmartPort calls. The internal SuperDrives are controlled by the Macintosh LC
- hardware and cannot be accessed by the IWM on the Apple IIe Card.
-
- Apple Disk 5.25 Drives
-
- The Apple Disk 5.25 drives can be mapped only into slot 6. Either one or two
- external Apple Disk 5.25 drives can be connected to the Apple IIe Card's disk
- drive connector and they are controlled by the IWM disk controller unit on
- the Apple IIe Card.
-
- Copy protection schemes that access video or I/O locations between sector or
- block reads and that depend on timing and will most likely fail on the Apple
- IIe Card.
-
- Clock
-
- The clock device can be mapped to any slot space except slot 3 (where the
- video firmware always resides) or slot 6 (where the Apple Disk 5.25 always
- resides). The firmware of the clock pseudo-I/O device looks just like the
- firmware of a ProDOS compatible clock. Clock card hardware is not emulated.
-
-
- Conclusion
-
- Most current Apple IIe applications run perfectly on the Apple IIe Card with
- no changes. By avoiding the few known differences listed in this Technical
- Note, you should be able to write new Apple IIe applications without adding
- code to special case for the Apple IIe Card. In applications that have
- special timing requirements, you can force the Apple IIe Card to run at 1 MHz
- by identifying the Apple IIe Card and using the processor speed routines
- supplied in this Note.
-
-
- Further Reference
- _____________________________________________________________________________
- o Apple IIe Card for the Macintosh LC User's Manual
- o Apple IIe Technical Reference Manual
- o Apple IIc Technical Reference Manual
- o Apple IIgs Firmware Reference
- o Apple II Memory Expansion Card Reference Manual
- o AppleMouse II User's Manual
- o ProDOS 8 Technical Reference Manual
- o Apple II Miscellaneous Technical Note #2: Apple II Family
- Identification Routines
- o Apple II Miscellaneous Technical Note #7: Apple II Family
- Identification
- o SmartPort Technical Note #4, SmartPort Device Types
- o SmartPort Technical Note #7, SmartPort Subtype Codes
-
-